/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package evaluation.ged;

import evaluation.Vertex;
import java.util.regex.Pattern;

/**
 *
 * @author phong
 */
public class VertexDeletion extends EditOperation {
    
    Vertex v;
    
    public VertexDeletion(Vertex v) {
        this.v = v;
    }

    public Vertex getVertex() {
        return this.v;
    }
    
    @Override
    public double getCost() {
        return 1;
    }
    
    @Override
    public boolean equals(Object o) {
        if (o instanceof VertexDeletion) {
            return this.v.equals(((VertexDeletion)o).v);
        }
        return false;
    }
    
    @Override
    public int hashCode() {
        return this.v.hashCode() * 31 + "vertexdeletion".hashCode();
    }
    
    @Override
    public String toString() {
        return "Del(" + this.v.toString() + ") with cost " + this.getCost();
    }
}
